Skip to content

108-marks: guide marks over the viewport and the interface (roadmap 108 U1b) - #685

Open
AlexZ005 wants to merge 12 commits into
mainfrom
lane/108-marks
Open

AlexZ005 wants to merge 12 commits into
mainfrom
lane/108-marks

Conversation

@AlexZ005

Copy link
Copy Markdown
Collaborator

DRAFT: do not merge before claude:9 rules on the grant kind (GRANT-STOP, QUESTIONS-108-marks Q1/Q3).

108-marks (U1b): guide marks — Claude points at things on your screen

Do not merge before claude:9 rules on the GRANT-STOP below. Base main (branch from v1.87.0). Rides the next open
int after 107b-int-2 (107b-int-3 or 108-int-1). Phase 2 is meant to stack on 108-tree: 108-tree is not ready yet (it hit
the same grant stop), so this branch is from v1.87.0 and reaches ui_tree through a one-function seam (below).

What

Instead of a whole-window screenshot, Claude draws on the person's own view the way the docs' pictures do: arrows,
hand-drawn rings, numbered badges and short labels.

  • show {action: "guide_marks", marks: [{kind: arrow | ring | number | label, object | at | screen, n, text}], current, clear_after_s} and show {action: "clear_guide_marks"}.
  • Anchors: an object uuid, a world point, a screen point (0..1 of the view). Marks follow the anchor while the camera or
    the object moves; an anchor off screen gets an edge arrow on the view's border.
  • Numbered steps show all at once; current is drawn stronger. It never advances by itself.
  • Phase 2: {control: id} anchors a mark on an interface control from ui_tree. It draws on a layer over the panels and
    under the top bar, every menu, dialog and toast. It follows the control through scroll, panel moves and resizes, hides
    while the control is scrolled away or covered, and goes when the control goes. The listing does not offer control
    until ui_tree is in the build. Until then it is refused with the reason.

Rules (all measured in the e2e)

  • Local to the person's tab. The layer is plain DOM over the canvas, so recordings, photos, Share as video and exports
    (which copy the WebGL canvas) never contain a mark. No wire message is involved: a two-tab row lists every type A sent.
  • No pointer events anywhere in the layer, so a click on an object or a control under a mark reaches it.
  • Every mark (and the chip) hides while a question card, an approval card or a dialog is open, and does not come back
    over it. A refused surface or a consent card is not a valid control anchor (ui_tree's check).
  • Label text is plain words only: no markup, links or emoji, at most 80 characters. Too long is refused, never cut. At
    most 12 marks. A new call replaces the set.
  • A chip, "'s marks", with Clear stays up while marks are; Esc also clears. Marks last 20 s by default, at most
    120 s. They have their own pacing (12 a minute), separate from show's 6. Refused in a headset.
  • Style matches the docs' marks (docs tools/shots/lib/draw.cjs): accent #ff7a45 on a dark halo, a 2.4 px stroke on a
    5.2 px halo, 12.5 px number badges, a seeded hand-drawn wobble. They come from new tokens --mark, --mark-halo,
    --mark-on. No emoji, no icon.

GRANT-STOP (claude:9)

The brief puts marks under the panel grant. That card says "open and close your panels and select things in them",
which does not cover drawing on the person's screen. The code gates marks as MARKS_KIND = 'panel' (showTool.js) only
so the mechanism can be tested; switching kinds is that one constant. The lane recommends a new kind point ("point at
things on your screen with arrows, rings and numbers"), shared with 108-tree's point_at. Details: the lane's
QUESTIONS-108-marks.md, Q1 and Q3.

Seam for 108-tree

guideMarks.setControlResolver({element(id) -> Element | null, check(id) -> true | reason}), called once by ui_tree.
Control ids are ui_tree's own, unchanged. At the stack: wire the resolver, add control to the marks item schema
(about +150 B), add the eval row "show me where the bake button is", and rebuild the bundle from v1.87.0 so it carries
both branches.

Numbers

  • Tool list: 117,007 → 118,341 B (+1,334). Measured tokens 47,381 → 47,926 (+545) with tests/agent-eval/tokens.mjs
    and sonnet. The Worker module is not on the Mac, so this used a stand-in that reproduces v1.87.0's real-Worker figure
    exactly (out/108-marks.standin-policy.mjs). Only show changed; its listing brief was rewritten and its pin
    refreshed.
  • Eval: 5 new rows u1b-* (point at the ball, where is the lamp without moving my view, number the crate and the door,
    circle and label the table, take the marks off). v1.87.0 catalog: 1/5 (it made 3D text objects in the scene to label
    things). This branch: 5/5. Same stand-in.
  • Build: the marks ride the existing show chunk, with no new lazy chunk. Slim export 827/850, full build 899/900.

Tests

  • vitest tests/unit/guideMarks.test.js (23): validation, plain-text rules, life, projection, the edge arrow, the docs
    paths, where each piece of a mark goes. showScene.test.js updated for the new actions.
  • e2e tests/e2e/connector-guide-marks.test.cjs: 74/74 in about 95 s, run twice on the Mac (battery.json 120). It
    covers the first-use question; the chip; no pointer events (a viewport click selects the cube under a ring, a chrome
    control under a screen mark is what's hit); follow and edge arrow; hiding under a question card, an approval and
    Settings; Esc, Clear, timer, replace, clear and current; refusals; pacing; phase 2 with a stand-in resolver; two tabs
    (nothing on B, no marks message from A); a recording with no mark colour while the screen shows the marks; folded and
    unfolded phone sizes with the forced toast (Clear is reachable and a tap clears).
    Mac run: APP_URL=https://localhost:7380/ E2E_CHROMIUM_EXTRA_ARGS=--disable-features=WebRtcHideLocalIpsWithMdns.
  • check-ratchet 272/37 (= baseline), check:tokens / zindex / emoji / loaders / storage clean, tools/agent catalog
    85/85, npm run build ok. Full unit run: 8,801 pass, 1 fail. The failure is levelTemplates "build from the kits",
    a 5 s timeout already known on this Mac (also on untouched v1.86.0).

🤖 Generated with Claude Code

Built on the Mac by lane 108-marks; pushed from the Deck by the orchestrator. Rides the int after 107b-int-2.

🤖 Generated with Claude Code

https://claude.ai/code/session_01P2hkj6fQfU2qTecxXNKeEB

AlexZ005 and others added 12 commits November 29, 2026 16:01
Roles, names, state words, secret fields read as (hidden), the refused set
never a node, name or value, people's text marked as data, stable ids,
the node cap with more: n, outline, changed-since diff and tokens, and the
point_at ring geometry. A leaf over panelsCore; not wired into any tool
(GRANT-STOP: no existing first-use card covers reading control values).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…t-only wiring)

uiTree.js walks only the panel registry's roots (toasts, modals and the
refused set are never under one; a refused container takes its subtree),
answers one panel in full or every open panel in outline, changed-since by
token, and model rows for the Flow / Shader editors and the Timeline.
point_at rings one control for 2 s: ids only from a read on this page, no
press, focus or scroll; an open panel not in front comes forward.

claude:9 ruling (29 Nov): reads go under READ_KIND = 'read' through the
setReadGate seam; point_at asks nothing and refuses through setPointGate
when the app's Guide marks switch is off. Both are registered by the Deck
lane 108-grants-read. Rides the uiStateTool chunk (no new lazy file).

e2e connector-ui-tree-108 (two tabs, drawing paused): the never-touch walk
over every refused surface and a consent card, secret fields (hidden),
since, point_at, Ana's chat line and object name as data, no new wire type.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…val drafts, docs

uiTreeTools.js holds the two schemas and the help text (imported by nothing
until the Deck lane 108-grants-read lists them: listing delta today 0 bytes).
requests-108-tree.json: 5 eval rows to merge then. battery.json lists the
new suite; CLAUDE.md entry for 108 U1.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…held to the 480 s limit); battery 130 s

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ee / point_at listed

- read = a new first-use kind ("see the names and values of controls in your open panels"): its own question
  (showTool.gateReadKind, Always / This time / No per app), never in show's combined question, so a 1.87.0
  Allow everything does not cover it; the old show:allow:<kind> migration is limited to panel / camera / code
- Guide marks switch per app (show:marks, on by default, not a grant): point_at and guide marks ask nothing and
  refuse when it is off; an app's first ring or marks show a one-time toast (marksGate(by, 'draw'))
- Settings > Privacy: "See the controls in my open panels" + a Guide marks section
- ui_tree / point_at are person tools, the connector's run {tree, point}; catalog + pins; controlResolver for
  guide marks (only ids a read on this page issued)
- eval rows merged into requests.json, mock answers; vitest grantsRead108; e2e connector-grants-read-108

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…aw phase and controlResolver

- tests/e2e/fixtures/lock/search.json re-recorded (LOCK_RECORD=1): additions only (the two new Privacy rows,
  18 lines) plus recordedAt
- CLAUDE.md: marksGate(by, 'draw') spends the toast only when drawing (e2e r1 caught a made-up id spending it; the
  fix is in phase 1), uiTree.controlResolver for guide marks

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…se finds it again

A WeakRef can hold a control the panel has since re-rendered (detached, still not collected): the resolver used it
and never ran find(). Now a detached ref falls through to find().

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…clear_guide_marks)

Roadmap 108 U1b. Claude points at things on the person's own screen the way the docs' pictures do,
instead of a screenshot: arrows, hand-drawn rings, numbered badges and short labels, anchored to an
object, a world point or a screen point, following the view, with an edge arrow when the anchor is
off screen. Numbered steps show all at once; `current` draws one stronger.

- Local to the person's tab: plain DOM over the canvas (never in a recording, photo or export; no
  wire message, measured in the two-tab row), pointer-events none on the whole layer.
- Hidden while a question card, an approval card or a dialog is open; back only once it closes.
- Plain text only (no markup, links or emoji), at most 80 characters, at most 12 marks; 20 s by
  default, at most 120 s; a new call replaces the set; the "<app>'s marks" chip with Clear; Esc.
- Style: the docs' marks (docs tools/shots/lib/draw.cjs) through new tokens --mark / --mark-halo /
  --mark-on. Its own pacing (12 a minute), not show's 6.
- Rides the show chunk (no new lazy chunk; full build 899 files).
- GRANT-STOP: gated as MARKS_KIND = 'panel' as the brief says, pending claude:9's ruling on whether
  the panel card text covers drawing on the screen (lane QUESTIONS Q1).

Tool list +1,334 B (117,007 -> 118,341), +545 measured tokens (47,381 -> 47,926, sonnet).
Eval: 5 rows u1b-*, v1.87.0 catalog 1/5, this branch 5/5.
Suites: vitest guideMarks (23) + showScene; e2e connector-guide-marks 57/57.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…lver seam

A mark may anchor on a control id from 108-tree's ui_tree ({control: id}). The tree owns which controls
exist and which are refused: it registers ONE resolver (guideMarks.setControlResolver {element, check});
until it does, a control anchor is refused with the reason, and the listing does not offer `control`
yet (it is added when this branch is stacked on 108-tree's).

- Control marks draw on their own layer over the panels and under the top bar, every menu, dialog and
  toast (z side-panel + 1, the chip + 2), pointer-events none: a click on the control under a ring
  reaches the control (measured).
- They follow the control's live box (scroll, panel moves, window resize); a control scrolled away or
  covered hides its mark until it shows again; a control gone takes its mark; every anchor gone ends
  the set and its chip (600 ms grace for a re-render).
- Numbered steps never advance on a press (Claude makes none); hidden under question cards as in phase 1.
- e2e connector-guide-marks section 10 with a stand-in resolver: 74/74 (twice, ~95 s).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ntrol anchors on ui_tree ids

- MARKS_ENABLED(app) from the per-app Guide marks switch replaces the test-only MARKS_KIND = 'panel' gate (claude:9
  ruling, 29 Nov); busy hands and the 12-a-minute pacing stay; gateShowKind back to its 1.87.0 shape
- a control anchor resolves only through uiTree.controlResolver (ids a ui_tree read on this page issued); the toast
  is spent only when marks are drawn
- the marks item schema and listing brief name the control anchor; descriptions say marks ask nothing
- unit + e2e: no question, the toast once, real ui_tree ids, a made-up id refused, the switch off refuses

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…9/10 checks

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ion 10 closes the chat window

- m2 on an unfolded phone (718 px): the centred toast stack reached over the chip's Clear, and the app's one-time
  'can draw guide marks' toast is up on exactly that first call. The chip now steps below any toast overlapping it.
- section 10's resize row: the chat column landed over the Inspector, so the mark correctly read 'not visible';
  the setup closes the chat window

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@AlexZ005

Copy link
Copy Markdown
Collaborator Author

Rebased by lane 108-grants-read onto lane/108-grants-read (#697, a667e70) and force-pushed. This PR stays a DRAFT: the 108 int un-drafts it.

What changed on top of the two original commits (claude:9 ruling, 29 Nov):

  • Marks ask no question. MARKS_ENABLED(app), read from the per-app Guide marks switch in Settings ▸ Privacy, replaces the test-only MARKS_KIND = 'panel' gate. Busy hands and the 12-a-minute pacing stay; gateShowKind is back to its 1.87.0 shape. Off = refused, and the error says so.
  • Control anchors resolve only through uiTree.controlResolver: an id a ui_tree read on this page issued. A made-up id is refused. The marks item schema and listing brief name the control anchor.
  • The one-time toast ("Claude can draw guide marks. Turn off in Settings ▸ Privacy.") is spent only when marks are drawn.
  • The chip steps below any toast that overlaps it. An unfolded phone (718 px) showed the centred toast stack covering the chip's Clear button on the first marks.
  • connector-guide-marks: section 1 = no question plus the toast once; section 10 = real ui_tree ids (the stand-in resolver is gone) and the switch-off refusal.

Proof on the Deck: connector-guide-marks 75/0; unit guideMarks 25/25; svelte-check 272/37 = baseline; check:tokens and check:emoji clean. Build: 899 / 900 export files, slim 827 / 850, no new chunk. Listing 119,277 B / 48,258 measured tokens (+1,497 B / +601 over #697).

🤖 Generated with Claude Code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant